def leading_spaces(s):
    ret = 0
    for a in s:
        if a == ' ':
            ret += 1
        else:
            break
    return ret


stack = []
current_indent = 0
current_group = ""

for a in open("items3.yml").readlines():
    print a,
counter = 0 
for a in open("items3.yml").readlines():
    counter += 1
    print counter
    this_line_indent = leading_spaces(a) / 4
    if (a[-3] == ":"):
        pass
    if(this_line_indent < current_indent):
        stack.pop()
    elif(this_line_indent == current_indent):
        pass
    elif(this_line_indent > current_indent):
        pass
    current_indent = this_line_indent